﻿using BLL.Dal;
using BLL.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class SysAdmin_Menu_Edit : System.Web.UI.Page
{
    public string menu_key;
    public string menu_name;
    public string menu_iconName;
    public bool menu_isActive = true;
    public string menu_url;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bindData();
        }
    }

    /// <summary>
    /// 初始化数据绑定
    /// </summary>
    void bindData()
    {
        if (Request["menu_key"] != null)
        {
            SysMenuDAL menuDal = new SysMenuDAL();
            SysMenu menuModel = menuDal.GetModel(Request["menu_key"]);
            if (menuModel != null)
            {
                menu_key = menuModel.menuCode;
                menu_name = menuModel.menuName;
                menu_iconName = menuModel.iconName;
                menu_isActive = menuModel.isActive;
                menu_url = menuModel.url;
            }
        }
    }
}